package com.wangba.service;

import com.wangba.dao.MemberMapper;
import com.wangba.pojo.Member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberMapper memberMapper;


    public int addMember(Member member) {
        return memberMapper.addMember(member);
    }

    public int deleteMemberById(int id) {
        return memberMapper.deleteMemberById(id);
    }

    public int updateMember(Member member) {
        return memberMapper.updateMember(member);
    }

    public Member queryMemberById(int id) {
        return memberMapper.queryMemberById(id);
    }

    public List<Member> queryAllMember() {
        return memberMapper.queryAllMember();
    }

    public Member queryMemberByName(String memberName) {
        return memberMapper.queryMemberByName(memberName);
    }
}
